package com.sikiedu.logindemo2.utils;

public class CommonResult<T> {
    private int status;
    private T data;

    protected CommonResult(int status,T data){
        this.status=status;
        this.data=data;
    }
    public static <T> CommonResult<T> successResult(){
        return new CommonResult<T>(0,null);
    }
    public static <T> CommonResult<T> successResult(T data){
        return new CommonResult<T>(0,data);
    }

    public static <T> CommonResult<T> failResult(int status,T data){
        return new CommonResult<T>(status,data);
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
